package com.fesco.mis.fm;

import com.fesco.mis.fm.properties.SpringApplicationProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

/**
 * <descption>项目启动入口</descption>
 * @date ：2017/9/1 15:01
 * @author：梅海波<meihaibo13186@sinosoft.com.cn>
 * @version:0.1
 */
@SpringBootApplication
@ImportResource(locations = {"classpath:config/conf.xml"})
public class Application {
    private static final Logger logger = LoggerFactory.getLogger(Application.class);
    private static SpringApplicationProperties springApplicationProperties;

    @Autowired
    public Application(SpringApplicationProperties springApplicationProperties) {
        this.springApplicationProperties = springApplicationProperties;
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        logger.info(springApplicationProperties.getName()+" started ...");
    }

}
